package com.projects.android.utils;

import android.app.Activity;
import android.content.SharedPreferences;

public class Settings {

	public static void savePreference(String serveraddress, Activity activity){
		//save to preferences
		SharedPreferences settings = activity.getSharedPreferences("callfood", 0);
		SharedPreferences.Editor editor = settings.edit();
		editor.putString("serveraddress", serveraddress);
		editor.commit();
	}
	
	public static String loadPreference(Activity activity) {
		SharedPreferences settings = activity.getSharedPreferences("callfood", 0);
		return settings.getString("serveraddress", "");
	}
}
